﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WindowsFormsApp1.DAL;
using WindowsFormsApp1.Mode;

namespace WindowsFormsApp1.BLL
{
	public class ProductBLL
	{
		/// <summary>
		/// 增加一条数据,返回ID
		/// </summary>
		public static int Add(Prouduct model)
		{
			return ProductDAL.Add(model);
		}

		/// <summary>
		/// 获得数据列表
		/// </summary>
		public static DataTable GetList(string strWhere, string orderby, string table)
		{
			return ProductDAL.GetList(strWhere, orderby,table);
		}

		/// <summary>
		/// 分页获取数据列表
		/// </summary>
		public static EntityPage<Prouduct> GetProuductList(BaseSearchPage search)
		{
			return ProductDAL.GetProuductList(search);
		}

			/// <summary>
			/// 获取一级类别
			/// </summary>
			public static DataTable GetOneClass()
		{
			return ProductDAL.GetOneClass();
		}
	}
}
